import { getBudgetDo } from '@/assets/js/api'
export const mutations = {
  isLoading (state, info) {
    state.isLoading = info
  },
  routerAni (state, info) {
    state.routerAni = info
  },
  sessionID (state, info) {
    state.sessionID = info
    sessionStorage.setItem('sessionID', info)
  },
  userNum (state, info) {
    state.userNum = info
    sessionStorage.setItem('userNum', info)
  },
  userInfo (state, info) {
    state.userInfo = info
    sessionStorage.setItem('userInfo', JSON.stringify(info))
  },
  getBudgetDo (state, info) {
    getBudgetDo(list => {
      state.getBudgetDo = list
      sessionStorage.setItem('getBudgetDo', JSON.stringify(list))
    })
  },
  evectionExpense (state, info) {
    state.evectionExpense = info
    sessionStorage.setItem('evectionExpense', JSON.stringify(info))
  },
  bizAccountBill (state, info) {
    let bizAccountBill = Object.assign({}, state.bizAccountBill, info)
    sessionStorage.setItem('bizAccountBill', JSON.stringify(bizAccountBill))
    state.bizAccountBill = bizAccountBill
  },
  resetBizAccountBill (state, info) {
    state.bizAccountBill = info || {}
  }
}
